FROM registry.cn-chengdu.aliyuncs.com/lsxd/golang:v1.22.6 AS builder

# 设置工作目录
COPY . /src
WORKDIR /src
RUN make build


# 构建最小化的 Docker 镜像,scratch特殊镜像，为空
FROM scratch
COPY --from=builder /src/bin/ /
CMD ["/hello"]